1. Field of the Invention
The present invention relates to a system for carrying out communication between a plurality of electronic devices connected to a bus with which physical addresses are automatically assigned to the connected electronic devices, as with, for example, a P1394 serial bus.
2. Description of the Related Art
Conventionally, audio-visual (hereinafter abbreviated to "AV") communications systems using a P1394 serial bus have been considered for AV communications systems for sending and receiving control signals and digital AV signals between AV devices such as video cassette recorders (hereinafter referred to as "VCR's") and televisions (hereinafter referred to as TV's) connected by a digital bus.
An example of this kind of communications system will first be described with reference to FIG. 6. This communications system is equipped with the following AV devices: a TV, a VCR 1, a VCR 2 and a camcorder (hereinafter referred to as "CAM"). The CAM and the TV, the TV and the VCR 1, and the VCR 1 and the VCR 2 are connected by a P1394 serial bus capable of transmitting digital AV signals and control signals in a mixed state. Each device has a function for relaying control signals and digital AV signals on the P1394 serial bus.
FIG. 7 is a block diagram showing the basic construction of a VCR as an example of one of the AV devices present in the communications system in FIG. 6. This VCR is equipped with a deck 1, tuner 2, an operation part 3 which acts as a user interface, a display 4, a microcomputer 5 for carrying out the overall control of the operation of the VCR along with packet construction and address holding to be described later, a digital interface (hereinafter referred to as a digital I/F) 6 for a P1394 serial bus and a switch box 7 for changing over between the signals from the deck 1, tuner 2 and digital I/F 6. These are the basic blocks which make up a VCR. When the AV device is a TV, a monitor and antenna are set up in place of the deck 1 and the display 4 is not set up. In the case of a CAM, a camera is set up in place of the tuner 2.
In the communications system in FIG. 6, communications are carried out within a prescribed communications cycle (for example, 125 ms), as shown in FIG. 8. Both synchronous communications, where communications with data signals such as digital AV signals are consecutively carried out at a fixed data rate, and asynchronous communications where irregular transfers occur as deemed necessary by control signals such as connection control commands, can be carried out.
A cycle start packet CSP is present at the start of the communications cycle, after which a period is set up for sending packets for synchronous communications. It is possible to carry out a number of synchronous communications by assigning channel numbers 1, 2, 3, . . . N to the respective packets for carrying out synchronous communications. For example, if channel 1 is assigned for communications from the CAM to the VCR 1, the CAM sends a synchronous communications packet with the channel number 1 attached, directly after the cycle start packet CSP. The VCR monitors the bus and then takes in a synchronous communications packet with the channel number 1 attached so that communications can be carried out. If communications from the VCR 2 to the TV are then assigned to channel 2, communications from the CAM to the VCR 1 can be carried out at the same time as communications from the VCR 2 to the TV.
The period between the end of the sending of the synchronous communication packets for all of the channels and the next cycle start packet CSP is used for asynchronous communications. In FIG. 8, packets A and B are asynchronous communication packets.
When AV devices are connected in a communications system using a P1394 serial bus, node ID's (physical addresses) are assigned automatically in accordance with the connection conditions. In the case in FIG. 6, #0 to #3 are the node ID's. A simple explanation of the node ID layout procedure will now be given with reference to FIG. 9.
FIG. 9 shows a hierarchical structure where a leaf node B and a branch node C are connected a level down from a root node A and a leaf node D, and a leaf node E are connected a level down from a branch node C. To put it another way, node A is a parent node of node B and C, while node C is a parent of nodes D and E. First, the procedure for determining this hierarchical structure will be described.
When connections are made using a twisted pair cable for a P1394 serial bus between the nodes A and B, A and C, C and D and C and E, a node which has only one input/output port connected to another node informs the latter node that the latter node is a parent node.
In the case in FIG. 9, node B informs port 1 of node A that node A is a parent node, node D informs port 2 of node C that node C is a parent node, and node E informs port 3 of node C that node C is a parent node.
As a result, node A recognizes the connection of a child node at port 1, and informs node B from port 1 that node B is a child node. Node C also informs node D from port 2 that node D is a child node with port 3 of node E being informed from port 3 that node E is a child node.
Then, a node having a number of input/output ports connected to other nodes sends, to a node other than the nodes which have informed the first-mentioned node that the first-mentioned node is a parent node, a notice to the effect that the second-mentioned node is a parent node.
In the case in FIG. 9, node C sends an indication that node A is a parent node to port 2 of node A, and node A sends an indication to the effect that node C is a child node to port 1 of node C. At this time, the node which first receives an indication that it is a parent node actually becomes a parent node because indications that the opposing node is a parent node are communicated reciprocally between node A and node C. If indications that the opposing node is a parent node are communicated simultaneously, an indication that the opposing node is a parent node is recommunicated after a period of time randomly set up at each of the respective nodes. FIG. 9 shows the case where node A has become a parent node in this way.
In the above description, nodes B, D and E, each having only one input/output node connected to another node become child nodes as a result of informing the respective opposing nodes that the opposing nodes are parent nodes. However, for example, if the timing that node B informs node A that node A is a parent node is slow, and if node B is informed that it is a parent node, node B will become a root node.
Next, the procedure for assigning physical addresses to the respective nodes will be described. Basically, with the physical addressing of the nodes, the parent node gives permission for an address to be given to the child node. If there are a number of child nodes, for example, permission will be given to the child nodes in the ascending order of the numbers of the ports to which the child nodes are connected.
In FIG. 9, where node B is connected to port 1 of node A and node C is connected to port 2 of node A, node A gives permission for an address to be assigned to node B. Node B gives itself node ID #0 and data indicating that fact is sent to the bus.
Next, node A gives permission for an address to be assigned to node C. Node C then gives permission for an address to be given to node D connected at port 2. Node D then assigns node ID #1 to itself. Then, node C gives permission for an address to be given to node E connected at port 3. Node E assigns node ID #2 to itself. Node C then assigns itself node ID #3 once the address assignment for the child nodes D and E has been completed. Node A assigns itself node ID #4 once the address assignment for the child nodes B and C has been completed.
The details of a P1394 bus including this kind of node ID assignment procedure can be found in the "IEEE, P1394 serial bus specification" published on 14th of Oct., 1993.
There are the following prior applications:
1. European Laid-Open Number: 0614297; PA1 2. Japanese Application Number: 05126682; PA1 3. Japanese Application Number: 05200055,
and
by the same assignee as for this application, with U.S. patent applications for these three items pending.
In the aforementioned communications system, it is possible to know how many devices the system is constructed from by setting up a node ID table for all of the devices in the system for each device. Unfortunately, a device having a node ID which is the self-ID with one added on or a device having a node ID which is the self-ID with one taken away is not necessarily located at a neighboring position. For example, in FIG. 9, the node ID of the node to which the node having a node ID of #2 is directly connected is #3. However, the node ID of the node to which the node having a node ID of #0 is directly connected is #4.
The AV devices are assumed to have a number of ports because of the assumption that, in the case of a non-portable VCR, connections will be made with other non-portable VCR's and TV's, and CAM's etc. On the other hand, devices like CAM's, which are made to be portable, are assumed to have one port. However, means for selecting the device which is to be the communications opponent has to be set up though there is only one opponent directly connected.
A feature of conventional, non-portable analog VCR's (decks) is a CAM control function. This is a function where a directly connected CAM can be controlled etc. using the VCR operation panel. However, it is difficult to realize the control of a limited opponent as in the above CAM control in an AV communications system using a P1394 serial bus.
The present invention has been made to resolve these kinds of problems and therefore, it is an object of the present invention to provide an electronic device capable of controlling and communicating with a limited opponent in a communications system employing a P1394 serial bus etc.